home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / dsp / software.inf < prev    next >
Encoding:
Text File  |  1988-08-09  |  13.2 KB  |  351 lines

  1. December 23, 1987 
  2. DSP Group notes de W3IWI
  3.  
  4. This set of notes is intended to help you get started on the TAPR/AMSAT 
  5. DSP project.
  6.  
  7. 4. Software info:
  8.  
  9. So far the software for the DSP activities can best be described as 
  10. developmental and experimental. However, this disk contains what we've 
  11. got. Here are the contents of these three disks:
  12.  
  13. DSP1:
  14. DEL-SPRY ARC   141805  11-15-87   6:32p
  15.  
  16. The DEL-SPRY.ARC file contains all the stuff that Delanco-Spry normally 
  17. provides with their boards for commercial customers. This disk also 
  18. contains these notes files, plus other miscellany I chose to include. Note 
  19. that the PK-ALL.ARC file contains the PKARC/PKXARC set of utilities. A bug 
  20. has recently been found in PKXARC which is noted in the .BUG file in
  21. PK-ALL. The copies on this disk have been patched.
  22.         ----------------------
  23. DSP2:
  24. ASMS     ARC    60325  12-19-87   6:44p
  25. MAC320   ARC   209068   4-10-87   1:36p
  26. BIN      ARC    89584  11-03-87  12:59p
  27.  
  28. ASMS and BIN contain all the stuff that N4HY and I have generated. Bob 
  29. updated ASMS.ARC earlier this week and it should be current. The SPECT1K 
  30. program has been our workhorse. It is a 1024 point FFT with several power-
  31. spectrum averaging options. This is what I used to test the TAPR PSK 
  32. modem/radio combinations, and it is what we have used for EME and weak-
  33. signal work so far. This program is a real hack. It is dirty. We ain't 
  34. proud of the code. Also in these files are the code for Bob's PSK demod 
  35. and several filters. All the PC code was written and tested in Microsoft 
  36. "C" 4.0 (and recently 5.0). Bob was going to write up some user's notes on 
  37. our software for inclusion on this disk, but he has been to busy at work 
  38. to get it done.
  39.  
  40. MAC320 is Allen Ashley's TMS320 Macro Assembler. Note: this was acquired 
  41. personally by us and is not public domain! Mike Lamb (N7ML) of AEA is 
  42. keenly interested in seeing our DSP development activities progress and 
  43. has indicated his willingness to purchase several copies of this assembler 
  44. and Ashley's PC-based 320 emulator to loan to us. Documentation on the use 
  45. of this assembler was sent with your boards.
  46.             --------------------
  47. DSP3:
  48.  
  49. MACROS   ARC    44032   2-12-87   8:32p
  50. FLTGPT10 ARC     7680   2-12-87   8:36p
  51. MACROSRC ARC    25728   2-12-87   8:41p
  52. FFT32010 ARC    38400   2-12-87   8:53p
  53. FIRIIR   ARC    15232   2-12-87   8:56p
  54. ADPCMNON ARC    16896   2-12-87   9:32p
  55. DATAIO   ARC    31679   3-03-87   9:58a
  56. BELL212  ARC   134144   2-18-87   9:39p
  57. FIR      ARC    42835  11-03-87   1:17p
  58.  
  59. This material (except FIR.ARC) came from the TI TMS320 User's Library and 
  60. was originally obtained by Mike Parker and Dan Morrison. Someone should 
  61. check into TI's BBS and see if there are any new goodies we could use.
  62. FIR.ARC was supplied by N4HY and provides algorithms for computing FIR and 
  63. IIR filter coefficients.
  64.  
  65. In addition, Randy Cole and Billy Brackenridge have code for LPC digital 
  66. voice encoding which I hope they will make available as soon as they get 
  67. it ported over to the Delanco-Spry board.
  68.  
  69. Now for one final topic: software availablility. This DSP team will work 
  70. only if all the team members freely exchange their code with other team 
  71. members. On the TAPR/AMSAT DSP PROJECT sign-up sheet I had the following 
  72. simple agreement for you to sign:
  73.  
  74.   "  Yes, I would like to participate in the DSP project. I 
  75.      recognize that the DSP hardware and software are made 
  76.      available for experimental amateur development use only. 
  77.      I plan to abide by the 'rule' that my activities are to 
  78.      be part of a team and that code and ideas I generate 
  79.      will be made available to all other team members. I 
  80.      understand that AMSAT and TAPR incur no liability for 
  81.      the hardware or software involved in the DSP project."
  82.  
  83. Some of you did not use the TAPR/AMSAT signup form but sent in your 
  84. checks to Bob or the AMSAT office or me directly. I assume that you 
  85. agree to these statements. I want to see code and ideas moving between 
  86. the team members. I do not want to see a replay of the TNC2 firmware 
  87. 'proprietary code' debacles. You are not putting your code into the 
  88. public domain. You still retain rights for commercial use if you want. 
  89. You may want to assign rights to AMSAT or TAPR for commercial 
  90. 'exploitation'. I would point out that the 'sale' of the W3IWI & N4HY 
  91. orbit software by AMSAT, and the royalties coming to TAPR from the TNC2 
  92. hardware design have provided resources that have made other projects 
  93. possible.
  94.  
  95. January 12,1988
  96. DSP Notes de N4HY
  97.  
  98. TOYS!!!!!  Sorry this took so long.  The crap that Tom and I have had to
  99. deal with and put up with lately has been unbelievable and this took
  100. longer than I wanted because of these time eaters.  We will describe only
  101. those routines which we can be blamed for ;-).
  102.  
  103. A mini guide to some of the software written by W3IWI and N4HY and W5SXD
  104. is now in order.
  105.  
  106. I think we first need to agree on some standard setups.  All the code Tom
  107. and I have written expects that (1) you have an 80?87 (math chip, ? =2,3,
  108. or nothing) (2) you have your board at segment 0XD000 (see Delanco Spry
  109. manual) (3) your base IO address is set at 0X300 (again see Delanco Spry
  110. manual for setting jumpers for (2) and (3)).  0X means Hex number follows.
  111.  
  112. Because we are fooling so much with pointers to move this code around we
  113. have been sticking to code that allows easy manipulation of these pointers.
  114. This is "C" as a high level language and assembler for low level and speed.
  115.  
  116. All three of the current contributors use MicroSoft "C"  5.0 and Microsoft
  117. Assembler 5.0.  These are not the only compilers used in this group. Phil
  118. and others (including myself) have Aztec 4.01a "C" compiler.  These are
  119. all ansi-conforming compilers.
  120.  
  121. For an assembler for the TMS32010, we have supplied copies of Allen Ashley's
  122. MAC320 TMS32010 cross assembler which runs on the PC and produces hex files.
  123. To compile foo.asm, suppose that you are on computers C drive.  Type
  124.  
  125. mac320  foo.ccec
  126.  
  127. .asm is mandatory so it is not needed.  After the period are compiler flags.
  128.  
  129. ccec means the source is on the c drive, put the hex on the c drive, compile
  130. without producing a listing and put the symbol table on the c drive.  The
  131. symbol table is important for the emulator  (emu320.exe).  If you wish a
  132. listing and you want it to go to a file rather than screen type
  133.  
  134. mac320 foo.ccgc filename.ext
  135.  
  136. and it will write to a file named filename.ext.
  137.  
  138. If you wish it to be the printer, filename.ext may be PRN.
  139.  
  140. Now you have the code foo.hex on your drive, how do you get it to
  141. go onto the TMS32010 board.  We have supplied a utility for this function
  142. called intel.exe
  143.  
  144. intel.c and intel.exe
  145.  
  146. To use it suppose you wish to load foo.hex and you have set up your board
  147. as suggested above.  Type
  148.  
  149. intel foo d000 300 0
  150.  
  151. or
  152.  
  153. intel foo d000 300 1
  154.  
  155. This means load the intel hex file foo.  The board is located at the
  156. beginning of the segment D000 in your computer memory.  Its I/O port base
  157. address is 300 Hex.  The last number determines whether or not you then
  158. tell the processor to GO.  0 means load and do NOT execute and 1 means
  159. send the go signal to the TMS32010 board.
  160.  
  161. intel.exe is used extensively as you might imagine in the programs we
  162. have supplied.  spect.exe spect1k.exe, from320.exe, to320.exe, rcaspect.exe,
  163. tfft.exe, and many others spawn the process intel.exe to load files.
  164. It is important to have either intel.exe in the directory you are currently
  165. located in or to have it in your search path (type set on your PC to see
  166. what your current path is set to in your environment).  It is ABSOLUTELY
  167. imperative that the hex files be located exactly in the current directory.
  168.  
  169. Lets try a simple process now.
  170.  
  171. <<SAMPLE, STORE, AND/OR PLAYBACK>>
  172.  
  173. Lets gather some samples, store them on disk and then play them back.
  174.  
  175. Connect your radio through a lead to the A/D input on the board.
  176. Connect a speaker and small amp (Radio Shack mini speaker amp is invaluable
  177. and cheap) to the D/A output on the board.
  178.  
  179. Make sure that the file gather.hex is in the current directory.
  180. Make sure that the file from320.exe is in the current directory.
  181. Make sure that the file intel.exe is in the current directory.
  182.  
  183. Run
  184.  
  185. from320
  186.  
  187. If you have done this correctly, your will see some lines from the
  188. intel loader where the file gather.hex was loaded.
  189.  
  190. Answer 10000.0 for the sample rate
  191. and give it the full path name to a place where 193000 bytes are free
  192. for storage of a sample file.
  193.  
  194. This will gather just under 100000 samples (10 seconds).
  195.  
  196. Lets play it back.
  197.  
  198. Make sure that the file send.hex is in the current directory.
  199. Make sure that the file to320.exe is in the current directory.
  200. Make sure that the file intel.exe is in the current directory.
  201.  
  202. run to320.exe
  203.  
  204. It will load the program send.hex
  205. ask for the sample rate and which port.
  206.  
  207. The A/D port on board is 4, so answer port 4.
  208.  
  209. This will load the ~100000 samples and then blast them to the TMS32010.
  210.  
  211. If everything is hooked up correctly, you should hear the sampled audio
  212. from your radio, etc.  The A/D chips clip at +/- 5V so don't overdrive
  213. them.  +/- 5V is THE limit on input.
  214.  
  215.  
  216. << SPECTRUM ANALYZERS >>
  217.  
  218. SPECT1K.EXE
  219.  
  220. This is a HORRIBLE piece of C code that does some really fun stuff.
  221.  
  222. Requires CGA.
  223.  
  224. To run the spectrum analyzer program spect1k.exe you must have an 80x87.
  225. or you must recompile it yourself with options listed below.
  226.  
  227. You must have the following in the same directory
  228.  
  229. spect1k.exe
  230. intel.exe
  231. ffthy1k.hex
  232.  
  233. spect1k will load the DSP board and then begin asking questions.
  234.  
  235. What sample rate do you wish (6000 is about right for SSB rigs)?
  236.  
  237. How many spectra do I need to average to determine the amplitude response
  238. of the radio (for example) I am listening to?
  239. (100 is a good number to start with)
  240.  
  241. How many spectra do I collect before I update the display?
  242. (start with 5)
  243.  
  244. You should now be seeing spectra on your CGA screen.
  245.  
  246. Key commands
  247. Up arrow   increase scale
  248. Down arrow decrease scale
  249. Pg Dn      Slide Graphics Down
  250. Pg Up      Slide Graphics Up
  251. F1         smooth the spectra more (tconst on the bottom gets smaller)
  252. F2         smooth the spectra less
  253. F3         Quit
  254. F4         Restart
  255. F5         Set threshold.  from 0 to 199.   0 means off.  199 means the
  256.            bottom of the screen.   This sets off a tone at the freq that
  257.        corresponds to the maximum amplitude point in the spectral
  258.        display IF it is above threshold.  Useful as "CW remodulator"
  259.        in weak signal experiments.
  260. Bottom line display
  261. Rate      sample rate
  262. Scale     scale the spectra down by this many bits (keep it on the screen).
  263. tconst  the spectral smoothing constant or how much the newest spectra
  264.     is weighted in the display (set with F1 and F2 above)
  265. sample  how many spectra to collect before display
  266. freq    freq with largest amplitude
  267. amp     The value of that largest amplitude
  268.  
  269. <<TFFT.EXE>>
  270.  
  271. TFFT is by W5SXD and is a EGA spectrum analyzer.  It is a brilliant piece
  272. of work.  To use it, you must have 80X87 math chip
  273.  
  274. fft512.hex
  275. board.def
  276. tfft.exe
  277.  
  278. The program is COMPLETELY self explanatory and there are NO keystroke
  279. commands.  We will look forward to some of you adding them.  The
  280. sources and a make file are included.
  281. msc 4.0 and above with masm are needed
  282.  
  283. <<MODEM.HEX  MODEM.ASM>>
  284.  
  285. Modem is our first "modem code" on the TMS32010.  It part of the "dem"
  286. half only.  It is a BPSK to Bel202 FSK translator.  It tracks the carrier
  287. and makes bit decisions in order to remodulate the bits onto a Bel202
  288. FSK output.  This is so that you may copy JAS-1 or TAPR/W3IWI/JAMSAT
  289. BPSK modem output with an unmodified tnc.
  290.  
  291. you must have the following in the same directory
  292.  
  293. d320d.exe
  294. intel.exe
  295. modem.hex
  296.  
  297. Run d320d.exe
  298.  
  299. type
  300. t2,651
  301. q
  302.  
  303. This will set the sample rate at 9600 BPS (see DS manual)
  304. and then quit the debugger (d320d)
  305.  
  306. now run
  307.  
  308. intel modem d000 300 1
  309.  
  310. this will load and start  the modem code.
  311.  
  312. Hook the input to the receiver and the output to a tnc.  Copy JAS-1
  313. or BPSK modem output with it.  The code is rudimentary and many addtions
  314. are planned as we gear up for PHASE III-C, including clock recovery and
  315. drop the remodulator.  MAYBE some EQ, but probably not due to lack of
  316. sufficient RAM.
  317.  
  318.  
  319. <<Compilation instructions for compatibility with what Tom and I
  320.    have been doing lately>>
  321.  
  322.  
  323. To compile all C programs with msc 4.0 type
  324.  
  325. cl /Oat /AL /FPi87 /c filename.c
  326. link /stack:12000/F/PAC filename;  
  327.  
  328. or if you need some of the routines in Davids libraries do
  329.  
  330. link /stack:12000/F/PAC filename,,nul,mscl320
  331.  
  332. You probably don't need that much stack but you may experiment with it.
  333. After you are satisfied as to how much stack you really need, make that
  334. number smaller and turn OFF the stack checking routines by adding to
  335. the cl command the option /Gs.
  336.  
  337. If you are using msc 5.0 do /Oatl in place of /Oat
  338.  
  339. as msc 5.0 does loop optimizations.
  340.  
  341. If you are brain damaged and don't have an 80x87 change /FPi87 to
  342. /FPa in the compile line.
  343.  
  344. I didn't use msc for 4.0 because I wanted to use the same command for
  345. both compilers.  I have NO experience with any other C compiler on this
  346. code. Even though I have used and like Aztec for other purposes.  I have
  347. little experience with Turbo C having gotten disgusted when I divided
  348. two numbers and got the wrong answer.
  349.  
  350. Bob
  351.